package com.ihisomp.service.impl;

import com.ihisomp.dto.SysPathTreeDto;
import com.ihisomp.entity.SysMgrOrgPage;
import com.ihisomp.mapper.SysMgrOrgPageMapper;
import com.ihisomp.service.ISysMgrOrgPageService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 机构与权限关系（运营管理） 服务实现类
 * </p>
 *
 * @author zy
 * @since 2022-04-08
 */
@Service
public class SysMgrOrgPageServiceImpl extends ServiceImpl<SysMgrOrgPageMapper, SysMgrOrgPage> implements ISysMgrOrgPageService {

    /**
     * 根据机构代码查询机构程序权限
     *
     * @param orgKey
     * @return
     */
    @Override
    public List<SysPathTreeDto> getPathByOrgKey(String orgKey) {
        return baseMapper.getPathByOrgKey(orgKey);
    }

    /**
     * 根据机构代码删除机构程序权限
     *
     * @param orgKey
     * @return
     */
    @Override
    public int deletePathByOrgKey(String orgKey) {
        return baseMapper.deletePathByOrgKey(orgKey);
    }
}
